/**
 * Creat with IntelliJ IDEA
 * Description:
 * User:WZW
 * Date:2021-11-23
 * Time:19:21
 */
public class TestDemo {
    public static void main(String[] args) {
        DoubleLinkedList list = new DoubleLinkedList();
        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        list.addFirst(4);
        list.addLast(1);
        list.addLast(2);
        list.addLast(3);
        list.addLast(4);

        list.display();
        System.out.println(list.size());
        list.removeAllKey(8);
        list.display();
        System.out.println(list.size());
    }
}
